package com.design.state.order;

public class StateOrderProcessingDemo {
    public static void main(String[] args) {
        Order order = new Order();

        order.process(); // Processing order with pending payment...

        order.setState(new PaidState());
        order.process(); // Processing order with paid payment...

        order.setState(new ShippedState());
        order.process(); // Processing order with shipped item...

        order.setState(new CompletedState());
        order.process(); // Processing order with completed status...
    }
}
